package edu.gatech.cs2340.mule.view;

import java.awt.Color;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;

import edu.gatech.cs2340.mule.presenter.MuleGamePresenter;

/**
 * 
 * Represents a panel to alert the player of current events in the game.
 * 
 * @author Zach Elliott
 *
 */
public class BottomBannerPanel extends JPanel {
	
	private JLabel bannerLabel;
	
	/**
	 * Initializes the panel
	 * 
	 */
	public BottomBannerPanel() {
		setLayout(new GridLayout(1, 1));
		setBackground(MuleGamePresenter.BACKGROUND_COLOR);
		bannerLabel = new JLabel();
		bannerLabel.setBackground(MuleGamePresenter.BACKGROUND_COLOR);
		bannerLabel.setForeground(MuleGamePresenter.FOREGROUND_COLOR);
		bannerLabel.setHorizontalAlignment(SwingConstants.CENTER);
		add(bannerLabel);
	}
	
	/**
	 * 
	 * @param message The message to be displayed to the user
	 */
	public void updateBottomBannerLabel(String message) {
		bannerLabel.setText("<html><i><font size=+2>" + message);
	}
}
